package pdf;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfWriter;

public class PdfDocument {
	public void a(String text) throws FileNotFoundException, DocumentException {
		Paragraph paragraph=new Paragraph();  
		  Document document = new Document(PageSize.A4, 36, 100, 108, 180);
		  PdfWriter.getInstance(document,new  
		FileOutputStream("marginPDF.pdf"));
		  document.setMargins(180,108,71,10);
		  document.open();  
		  document.add(new Paragraph(text));
		 
		  
		  


		  document.close();}

	
}
